﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration;
using SeleniumTestProject.Properties;
using System.Resources;

namespace SeleniumTestProject.Tests.Core
{
    class POSSelector
    {
       
        public string GetTestDataByKey(String key)
        {

            if (ConfigurationSettings.AppSettings["Settings_site"].ToString() == "http://www.expedia.com/")
            {
                var resman = new System.Resources.ResourceManager(
                    "SeleniumTestProject.Properties.TestData_COM",
                    System.Reflection.Assembly.GetExecutingAssembly()
                );
                var text = resman.GetString(key);
                return text;
            }
            else if (ConfigurationSettings.AppSettings["Settings_site"].ToString() == "http://www.expedia.be/")
            {
                var resman = new System.Resources.ResourceManager(
                    "SeleniumTestProject.Properties.TestData_BE",
                    System.Reflection.Assembly.GetExecutingAssembly()
                );
                var text = resman.GetString(key);
                return text;
            }
            return null;
        }
        public string GetSteppedPageTextByKey(String key)
        {

            if (ConfigurationSettings.AppSettings["Settings_site"].ToString() == "http://www.expedia.com/")
            {
                var resman = new System.Resources.ResourceManager(
                    "SeleniumTestProject.Properties.PagesWalkingTextStore_COM",
                    System.Reflection.Assembly.GetExecutingAssembly()
                );
                var text = resman.GetString(key);
                return text;
            }
            else if (ConfigurationSettings.AppSettings["Settings_site"].ToString() == "http://www.expedia.be/")
            {
                var resman = new System.Resources.ResourceManager(
                    "SeleniumTestProject.Properties.PagesWalkingTextStore_BE",
                    System.Reflection.Assembly.GetExecutingAssembly()
                );
                var text = resman.GetString(key);
                return text;
            }
            return null;
        }
    }
}
